package com.yuexun.beilunpatient.ui.inspect.model.impl;


import com.yuexun.beilunpatient.base.BaseEntity;
import com.yuexun.beilunpatient.ui.inspect.api.InspectApi;
import com.yuexun.beilunpatient.ui.inspect.bean.CheckRowSet;
import com.yuexun.beilunpatient.ui.inspect.bean.JtRmyyCheckResult;
import com.yuexun.beilunpatient.ui.inspect.model.IInspectModel;
import com.yuexun.beilunpatient.utils.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/1/29.
 */
public class InspectModel implements IInspectModel {

    private InspectApi api;

    public InspectApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(InspectApi.class);
        }
    }

    @Override
    public Observable<BaseEntity<JtRmyyCheckResult>> inquireBlrmyyCheckPageList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireBlrmyyCheckPageList(praise);
    }

    @Override
    public Observable<BaseEntity<CheckRowSet>> inquireCheckPageList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireCheckPageList(praise);
    }

}
